const dayjs = require("dayjs");
const express = require("express");

const App = express();

App.get("/cars", (req, res) => {
    console.log("5002服务器接收到1个请求");
    res.setHeader("Content-Type", "application/json;charset=utf8");
    let result = [
        {
            name: "宝马",
            price: 300000,
        },
        {
            name: "哈喽单车",
            price: 2,
        },
    ];
    res.send(result);
});

App.listen(5002, () => {
    console.log("5002服务器启动了");
});
